home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
awe2-0_1.lha
/
awe2-0.1
/
Src
/
RCS
/
LockedHeap.cc,v
< prev
next >
Wrap
Text File
|
1989-03-28
|
1KB
|
93 lines
head 3.2;
branch ;
access ;
symbols ;
locks grunwald:3.2; strict;
comment @@;
3.2
date 89.02.20.15.35.47; author grunwald; state Exp;
branches ;
next 3.1;
3.1
date 88.12.20.13.48.56; author grunwald; state Exp;
branches ;
next ;
desc
@@
3.2
log
@Start using Gnu library heaps for schedulers
@
text
@// This may look like C code, but it is really -*- C++ -*-
//
// Copyright (C) 1988 University of Illinois, Urbana, Illinois
//
// written by Dirk Grunwald (grunwald@@cs.uiuc.edu)
//
#include "LockedHeap.h"
#include "stream.h"
void
LockedHeap::add(AwesimeHeapItem &t)
{
heapLock.reserve();
AwesimeHeap::add(t);
heapLock.release();
}
bool
LockedHeap::remove(AwesimeHeapItem &t)
{
heapLock.reserve();
bool ok = AwesimeHeap::remove(t);
heapLock.release();
return(ok);
}
bool
LockedHeap::doStart(AwesimeHeapIndex &)
{
assert(0);
return(0);
}
void
LockedHeap::doDone()
{
assert(0);
}
unsigned int
LockedHeap::size()
{
heapLock.reserve();
unsigned int s = AwesimeHeap::size();
heapLock.release();
return(s);
}
void LockedHeap::classPrintOn(ostream& s)
{
heapLock.reserve();
s << * ((AwesimeHeap *) this) ;
heapLock.release();
}
@
3.1
log
@Steay version
@
text
@@